package com.redbox.RedboxManagment.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.redbox.RedboxManagment.dao.IOrder;
import com.redbox.RedboxManagment.ejb.Order;

@Service
public class OrderServiceImp implements IOrderService {

	@Autowired
	private IOrder orderDao;
	
	@Override
	public Order retrieveOrder(int pId) {
		Order result = orderDao.findById(pId);
		return result;
	}

	@Override
	public Order createOrder(Order porder) {
		Order result = orderDao.persistOnMerge(porder);
		return result;
	}

}
